# 字典创建
d = {
    'name':'mid',
    'yyy':'zxx',
    'xxx':'jjj'
}

print(d["name"])
print(d.get('name'))
print(d.get('name1','ggg'))

# 判断键是否在keys中
print('name' in d)


for key, value in enumerate(d):
    print(key, value)

for key in d:
    print(key)

for k,v in d.items():
    print(k,v)

for k in d.keys():
    print(k)
for v in d.values():
    print(v)
